import request from '../utils/request'

//车辆年检列表
export const NxAllList = (count = 1, limitNum = 10) => {
    return request({
        url: "/api/annAllPage",
        method: "GET",
        params: {
            count, limitNum
        }
    })
}
//分页查询
// export const nxList = (count = 1, limitnum = 10) => {
//     return request({
//         url: "/api/annAll?_count=" + count + "&_limitnum=" + limitnum,
//         method: "GET"
//     })
// }
// //修改内容
export const changenx = (obj) => {
    return request({
        url: "/api/updateAnnOne",
        method: "PUT",
        data: {
            id: obj.id,
            annDate: obj.annDate,
            annFee: obj.annFee,
            dueDate: obj.dueDate,
            carNumber: obj.carNumber,
        }
    })
}
// //增加
export const addnx = (obj) => {
    return request({
        url: "/api/AddAnnOne",
        method: "POST",
        data: {
            annDate: obj.annDate,
            annFee: obj.annFee,
            dueDate: obj.dueDate,
            carNumber: obj.carNumber,
        }
    })
}
// //删除
export const delnx = (id) => {
    return request({
        url: "/api/deleteAnnOne",
        method: "DELETE",
        params: {
            id
        }
    })
}
// //查询车辆
export const kannx = (id) => {
    return request({
        url: "/api/findAnnOne?id=" + id,
        method: "GET"
    })
}




//保险x


//保险列表
export const BxAllList = () => {
    return request({
        url: "/api/insureAll",
        method: "GET",
    })
}

//分页查询
export const BxList = (count = 1, limitNum = 10) => {
    return request({
        url: "/api/insureAllPage",
        method: "GET",
        params: {
            count, limitNum
        }
    })
}


// //修改内容
export const changebx = (obj) => {
    return request({
        url: "/api/updateInsureOne",
        method: "PUT",
        data: {
            id:obj.id,
            insureDate: obj.insureDate,
            insureFee: obj.insureFee,
            insurePlace: obj.insurePlace,
            carNumber: obj.carNumber,
            postId: obj.postId,
            handName: obj.handName
        }
    })
}
// //增加
export const addbx = (obj) => {
    return request({
        url: "/api/AddInsureOne",
        method: "POST",
        data: {
            insureDate: obj.insureDate,
            insureFee: obj.insureFee,
            insurePlace: obj.insurePlace,
            carNumber: obj.carNumber,
            handName: obj.handName
        }
    })
}
// //删除
export const delbx = (postId) => {
    return request({
        url: "/api/deleteInsureOne",
        method: "DELETE",
        params: {
            postId
        }
    })
}
// //查询车辆
export const kanbx = (postId) => {
    return request({
        url: "/api/findInsureOne?postid=" + postId,
        method: "GET"
    })
}
// //后端
// export const javawblist = () => {
//     return request({
//         url: "/api/message",
//         method: "GET"
//     })
// }